﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditProduct.aspx.cs" Inherits="Crm_EditProduct" ValidateRequest="false" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="crm.css" rel="stylesheet" type="text/css" />

    <script src="../js/jquery-1.2.6.js" type="text/javascript"></script>



    <script type="text/javascript">
        $(document).ready(function()
        {
//            //绑定
//            if ($("#hidTypes").val() != "")
//            {
//                var arrtypes = $("#hidTypes").val().split(",");
//                $("#tdtypes select").each(function(i)
//                {
//                    $(this).val(arrtypes[i]);
//                });
//            }

            $("#btnSubmit").click(function()
            {
                if ($.trim($("#txtProductName").val()) == "")
                {
                    alert("请输入产品名称!");
                    $("#txtName").focus();
                    return false;
                }
            });
        });
    </script>

</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table class="tblist" style="width: 800px; text-align: left">
            <colgroup>
                <col align="right" style="width: 100px;" class="bg1" />
            </colgroup>
            <tr class="ptitle" align="center">
                <td colspan="4" align="center">
                    添加/编辑产品
                </td>
            </tr>
             <tr>
                <td style="width: 100px">
                    所属分类：
                </td>
                <td colspan="3">
                    <asp:DropDownList ID="dropSort" runat="server" DataSourceID="AccessDataSource1" DataTextField="cate_name" DataValueField="cateid">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                    产品名称：
                </td>
                <td style="width:350px">
                    <asp:TextBox ID="txtProductName" Width="200px" MaxLength="50" CssClass="inputtxt" runat="server"></asp:TextBox>
                </td>
                 <td  align="right">上市时间：</td><td>
                     <asp:DropDownList ID="dropshowtime" runat="server">
                     </asp:DropDownList>
                </td>
            </tr>
         
            <tr>
                <td style="width: 100px">
                    编号：
                </td>
                <td colspan="3">
                    <asp:TextBox ID="txtProductNO"   Width="300px" CssClass="inputtxt" MaxLength="50" runat="server"></asp:TextBox>                    
                    
                </td>
               
            </tr>
            
         
            
         <tr>
                <td style="width: 100px">
                    备注：
                </td>
                <td colspan="3">
                    <asp:TextBox ID="txtContent" Width="500px" Height="150px" TextMode="MultiLine" runat="server"></asp:TextBox>
                </td>
            </tr> <tr style="width: 100px;display:none;">
                <td >
                    价格：
                </td>
                <td colspan="3">
                    <asp:TextBox ID="txtPrice" Width="50px" onkeyup="value=value.replace(/[^\d]/g,'') " onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"  Text="0" CssClass="inputtxt" MaxLength="10" runat="server"></asp:TextBox>元 RMB
                </td>
            </tr>
             <tr>
                <td style="width: 100px">
                    上传图片：                </td>
                 <td colspan="3">
                    <asp:FileUpload ID="fileUpload" runat="server" Width="300px" />
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                    下载地址：                </td>
                 <td colspan="3">
                   <asp:TextBox ID="txtDownloadFile" Width="300px"  CssClass="inputtxt" MaxLength="50" runat="server"></asp:TextBox>  大小:<asp:TextBox ID="txtSize" Text="20M" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr style="display:none;">
                <td style="width: 100px">
                    是否显示：
                </td>
                 <td colspan="3">
                    <asp:CheckBox ID="chkIsShow" Checked="true" runat="server" /><input id="hidTypes" runat="server" type="hidden" /><asp:Label ID="lblTip" runat="server" ForeColor="Red"></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="width: 100px">
                    发布时间：                </td>
                 <td colspan="3">
                    <asp:TextBox ID="txtPublishTime" Width="300px"  CssClass="inputtxt" MaxLength="50" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                </td>
              <td colspan="3">
                    <asp:Button ID="btnSubmit" runat="server" Text="提 交" OnClick="btnSubmit_Click" />
                  &nbsp;
                    <asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="清 空,重新发布" />
                  <asp:Label ID="lblResult" runat="server" Text="" ForeColor="Red"></asp:Label>
                </td>
                
            </tr>
        </table>
    </div>
    <%-- <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/xml/ad.xml"></asp:XmlDataSource>--%>
    <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/flashcrm.mdb" SelectCommand="SELECT [cateid], [cate_name] FROM [ProductCate]"></asp:AccessDataSource>
    </form>
    
</body>
</html>
